package com.example.moshudriver.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.BeeFramework.activity.BaseActivity;
import com.sgr.dykdriver.R;
import com.example.moshudriver.wxapi.WXEntryActivity;

public class D3_OrderCommentCompleteActivity extends BaseActivity implements View.OnClickListener{
    private TextView mTitle;
    private ImageView mBack;
    private Button mBtnBack;
    private LinearLayout mShareComment;
    private int mOrderId;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.d3_order_comment_complete);
        mOrderId =getIntent().getIntExtra("order_id",0);
        mTitle = (TextView) findViewById(R.id.top_view_title);
        mTitle.setText(getString(R.string.evaluate_complete));
        mBack = (ImageView) findViewById(R.id.top_view_back);
        mBtnBack = (Button) findViewById(R.id.btn_back);
        mShareComment = (LinearLayout) findViewById(R.id.share_comment);
        mBack.setOnClickListener(this);
        mBtnBack.setOnClickListener(this);
        mShareComment.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch(v.getId()) {
            case R.id.top_view_back:
                finish();
                break;
            case R.id.btn_back:
                finish();
                break;
            case R.id.share_comment:
//            	Toast.makeText(getApplicationContext(), "分享", 0).show();
                Intent intent =new Intent(this, WXEntryActivity.class);
                intent.putExtra(WXEntryActivity.IS_COMMENT,true);
                intent.putExtra("order_id", mOrderId);
                startActivity(intent);
                overridePendingTransition(R.anim.push_buttom_in,R.anim.push_buttom_out);
                break;
        }
    }
}
